package com.will.order.controller;

import com.will.common.dto.OrderDto;
import com.will.common.response.AjaxResult;
import com.will.order.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private IOrderService orderService;

    @PostMapping("/createOrder")
    public AjaxResult createOrder(@RequestBody OrderDto orderDto){
        return orderService.createOrder(orderDto);
    }
}
